package com.chinacoal.microservice.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.chinacoal.microservice.pojo.AssessmentStatistics;
import com.chinacoal.microservice.pojo.CcmsSmartleasingAssessment;

/**
 * 考核模块-考核管理mapper类
 * @author wiilead
 *
 */
public interface CcmsSmartleasingAssessmentMapper extends BaseMapper<CcmsSmartleasingAssessment>{
	/**
	 * 修改考核信息
	 * @param assessment
	 */
	void updateAssessment(CcmsSmartleasingAssessment assessment);
	
	/**
	 * 查询考核列表
	 * @param toPage
	 * @param type 1.考核管理 2.我的考核
	 * @param list
	 * @param userAccountId
	 * @return
	 */
	List<CcmsSmartleasingAssessment> selectAssessmentList(Page<CcmsSmartleasingAssessment> toPage,
															@Param("type") Integer type,
															@Param("list") List<String> list,
															@Param("userAccountId") Integer userAccountId);
	
	/**
	 * 考核详情
	 * @param assessmentId
	 * @return
	 */
	CcmsSmartleasingAssessment selectAssessmentInfo(@Param("assessmentId")String assessmentId);
	
	/**
	 * 删除考核信息
	 * @param assessmentId
	 */
	void deleteAssessment(@Param("assessmentId")String assessmentId);
	
	/**
	 * 修改考核总得分
	 * @param score
	 * @param assessmentId
	 */
	void updateAssessmentTotalScore(@Param("score")Double score,@Param("assessmentId")String assessmentId);
	
	/**
	 * 考核统计
	 * @param toPage
	 * @param type
	 * @return
	 */
	List<AssessmentStatistics> statisticsAssessmentList(Page<AssessmentStatistics> toPage,@Param("type")Integer type);
	
}
